#include "process.h"
void download(callback_t ct)
{
  int total=1024*1024;
  int sum=0;
  int count=10;
  while(sum<=total)
  {  
     sum+=1024*10;
     usleep(40000);
     int rate=sum*100/total;
    if(rate>=50&&count)
    { 
    
        sum=total/2;
        --count;
    }
     ct(rate);
  }
}
int main()
{  download(process2);
  printf("\n");

    return 0;
}
